﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Common.Attributes;
using Microsoft.Extensions.Logging;

namespace Service
{
    [Component(ServiceType = typeof(IDictService))]
    public class DictService : IDictService
    {
        #region 构造函数

        private readonly ILogger<DictService> _logger;

        public DictService(ILogger<DictService> logger)
        {
            _logger = logger;
        }

        #endregion

        public string GetTextByParentCode(string parentCode, string value)
        {
            // var dicDataDtos = GetAllDicDataListByParentCode(parentCode).Result;
            // return dicDataDtos?.FirstOrDefault(x => x.DicCode == value)?.DicText;
            return parentCode + "_" + value;
        }

        public string GetTextByValue(string value)
        {
            return value;
        }
    }
}